/**
 * 
 */
package org.jboss.minstaller.util



/**
 * @author jjeon@redhat.com
 * 
 */
public class FtpUtil {
    
    public static void ftpCommand(serverIp, userId, passWord, remoteDir, localDir) {
        def ant = new AntBuilder() 
        ant.ftp( userid:userId, password: passWord, server: serverIp, remotedir:remoteDir, binary:"yes" ) { 
            fileset( dir:localDir );
        }
    }
    
    
    static void main(args) {
        FtpUtil.ftpCommand( "localhost", "jboss", "jboss", "/home/jboss/remote", "/home/jboss/local" );
        //FtpUtil.ftpCommand( "localhost", "jboss", "jboss", "/svc/pm/was/jboss-eap-4.3/jboss-as", "./resources/jbossas/server.conf" );
    }	
}
